﻿package Message.Public
{
    import Framework.Serialize.*;
    import flash.utils.*;

    public class SMapDefine extends Object
    {
        public var mapId:int;
        public var groupId:int;
        public var name:String;
        public var instanceType:EMapInstanceType;
        public var realWidth:int;
        public var realHeight:int;
        public var clientFile:int;
        public var serverFile:String;
        public var ownerType:EMapOwnerType;
        public var belong:EMapBelong;
        public var fightMode:int;
        public var needLevel:int;
        public var enterMode:int;
        public var enterPoint:SPoint;
        public var subline:Boolean;
        public var cross:Boolean;
        public var restrictionType:int;
        public var revivalRestriction:Dictionary;
        public var revivalMaps:Dictionary;
        public var passPoints:Array;
        public var npcs:Array;
        public var sharps:Array;
        public var weather:int;
        public var musicId:int;
        public var deathEvents:Array;
        public var taxRate:int;
        public var jumpPointSeq:Array;
        public var areas:Array;
        public var defaultBossPoint:Boolean;
        public var bossPoint:SPoint;
        public var showLimit:int;

        public function SMapDefine()
        {
            return;
        }// end function

        public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.mapId);
            param1.writeInt(this.groupId);
            param1.writeString(this.name);
            this.instanceType.__write(param1);
            param1.writeInt(this.realWidth);
            param1.writeInt(this.realHeight);
            param1.writeInt(this.clientFile);
            param1.writeString(this.serverFile);
            this.ownerType.__write(param1);
            this.belong.__write(param1);
            param1.writeInt(this.fightMode);
            param1.writeInt(this.needLevel);
            param1.writeInt(this.enterMode);
            this.enterPoint.__write(param1);
            param1.writeBool(this.subline);
            param1.writeBool(this.cross);
            param1.writeInt(this.restrictionType);
            DictIntIntHelper.write(param1, this.revivalRestriction);
            DictIntIntHelper.write(param1, this.revivalMaps);
            SeqPassPointHelper.write(param1, this.passPoints);
            SeqNpcHelper.write(param1, this.npcs);
            SeqMapSharpHelper.write(param1, this.sharps);
            param1.writeInt(this.weather);
            param1.writeInt(this.musicId);
            SeqMapDeathEventHelper.write(param1, this.deathEvents);
            param1.writeInt(this.taxRate);
            SeqPointSeqHelper.write(param1, this.jumpPointSeq);
            SeqMapAreaHelper.write(param1, this.areas);
            param1.writeBool(this.defaultBossPoint);
            this.bossPoint.__write(param1);
            param1.writeInt(this.showLimit);
            return;
        }// end function

        public function __read(param1:SerializeStream) : void
        {
            this.mapId = param1.readInt();
            this.groupId = param1.readInt();
            this.name = param1.readString();
            this.instanceType = EMapInstanceType.__read(param1);
            this.realWidth = param1.readInt();
            this.realHeight = param1.readInt();
            this.clientFile = param1.readInt();
            this.serverFile = param1.readString();
            this.ownerType = EMapOwnerType.__read(param1);
            this.belong = EMapBelong.__read(param1);
            this.fightMode = param1.readInt();
            this.needLevel = param1.readInt();
            this.enterMode = param1.readInt();
            this.enterPoint = new SPoint();
            this.enterPoint.__read(param1);
            this.subline = param1.readBool();
            this.cross = param1.readBool();
            this.restrictionType = param1.readInt();
            this.revivalRestriction = DictIntIntHelper.read(param1);
            this.revivalMaps = DictIntIntHelper.read(param1);
            this.passPoints = SeqPassPointHelper.read(param1);
            this.npcs = SeqNpcHelper.read(param1);
            this.sharps = SeqMapSharpHelper.read(param1);
            this.weather = param1.readInt();
            this.musicId = param1.readInt();
            this.deathEvents = SeqMapDeathEventHelper.read(param1);
            this.taxRate = param1.readInt();
            this.jumpPointSeq = SeqPointSeqHelper.read(param1);
            this.areas = SeqMapAreaHelper.read(param1);
            this.defaultBossPoint = param1.readBool();
            this.bossPoint = new SPoint();
            this.bossPoint.__read(param1);
            this.showLimit = param1.readInt();
            return;
        }// end function

    }
}
